<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        #main {
            height: 2000px;
            background-color: skyblue;
            border-top: 50px solid pink;
        }

        .side-bar {
            position: fixed;
            right: 0;
            top: 50%;
            background-color: pink;
            padding: 10px 15px;
        }

        .side-bar ul li {
            width: 80px;
            height: 80px;
            background-color: rgba(0, 0, 0, 0.3);
            overflow: hidden;
            margin: 5px 0;
            cursor: pointer;
        }

        .side-bar ul .img1 img {
            position: relative;
            left: -278px;
            top: -1px;
        }

        .side-bar ul .img1:hover img {
            position: relative;
            left: -1px;
            top: -277px;
        }

        .side-bar ul .img2 {
            background-image: url(img/sprite_right.png);
            background-position: -1px -277px;
        }

        .side-bar ul .img2:hover {
            background-image: url(img/sprite_right.png);
            background-position: -277px -1px;
        }

        .side-bar ul .bar-top img {
            position: relative;
            left: -95px;
            top: -277px;
        }
    </style>
</head>

<body>
    <div id="main">

    </div>
    <div class="side-bar">
        <ul>
            <li class="img1">
                <img src="img/sprite_right.png" alt="">
            </li>
            <li class="img2"></li>
            <li class="bar-top">
                <a href="#main"><img src="img/sprite_right.png" alt=""></a>

            </li>
        </ul>
    </div>
</body>

</html>